SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- =============================================
-- Author:		Martin Peveri
-- Create date: 25/11/2011
-- Description:	Informe de categoría de entidades
-- =============================================
CREATE PROCEDURE [dbo].[listcategent_log_res] 
	-- Add the parameters for the stored procedure here
	@id_entidad_desde char,
	@id_entidad_hasta char
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	select s.id_entidad, s.nombre, s.domicilio, s.codpos, s.email, s.localidad, s.provincia, s.tel,
	 s.reg_habilitado, s.contacto
	from App_entidad s
	where s.id_entidad BETWEEN @id_entidad_desde AND @id_entidad_hasta 
		AND s.id_perfil = 'P'
	ORDER BY s.id_entidad
END
GO
